<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/include/taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ include file="/include/header.jsp"%>
<link href="${ctx}/css/report.css" type="text/css" rel="stylesheet" />
<script src="${ctx}/js/jquery.SuperSlide.js" type="text/javascript"></script>
<title>密码修改</title>
<script type="text/javascript">
	$(document).ready(function () {
		$(".tabBar").slide({
			mainCell : ".conWrap", effect : "left", trigger : "click", pnLoop : false
		});
	});
	function cleanTiShi () {
		$(".eui-bubble-wrap").hide();
	}
</script>
</head>
<body style="background-color: white;">
	<div class="main_panel">
		<div class="tabBar">
			<div class="hd">
				<ul>
					<li class="on" onclick="cleanTiShi()">密码修改</li>
				</ul>
			</div>
			<div class="bd" style="height: 450px;">
				<div class="conWrap">
					<div class="con">
						<div style="padding-top: 150px; padding-left: 200px;">
							<form id="paramDataForm">
								<table class="c_table">
									<tr>
										<td class="t_r">
											<font color="red">*</font>输入原密码：
										</td>
										<td class="t_l">
											<input type="password" class="input_txt" id="password" name="password" value="" />
										</td>
									</tr>
									<tr>
										<td class="t_r">
											<font color="red">*</font>输入新密码：
										</td>
										<td class="t_l">
											<input type="password" class="input_txt" id="newPassword" name="newPassword" value="" />
										</td>
									</tr>
									<tr>
										<td class="t_r">
											<font color="red">*</font>确认新密码：
										</td>
										<td class="t_l">
											<input type="password" class="input_txt" id="confirmPassword" name="confirmPassword" value="" />
											<input type="button" class="d_btn m_l20" id="subBtn" value="确认" />
										</td>
									</tr>
									<tr style="height: 50px;">
										<td colspan="2" style="font-size: 12px; color: red; padding-left: 109px">【备注：修改密码成功后下次登录有效！】</td>
									</tr>
								</table>
							</form>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript">
			$(function () {
				// 注册按钮事件
				$("#subBtn").click(function () {
					if (confirm('确定修改？')) {
						// 序列化表单参数
						var serializedForm = $("#paramDataForm").serialize();
						$.post("${ctx}/sysUser/editPassword", serializedForm, function (result) {
							if ("succ" == result) {
								alert("修改成功");
								// 刷新列表页面
								location.replace("${ctx}/sysUser/toEditPassword"); //如果发表成功则跳到列表界面
							} else {
								alert(result);
							}
						}, "json");
					}
				});
			});
		</script>

	<%@ include file="/include/footer.jsp"%>
</body>
</html>
